package com.trg.generaltool.service.rabbitmq.conform.direct;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName: Provider
 * @Description:       生产者
 * @Author: tangrg
 * @Date: 2021/7/19 15:03
 * @Version: 1.0
 * @Return:
 **/
@Component
public class Provider {

    @Autowired
    RabbitTemplate rabbitTemplate;

    public void sendMessage(){
        rabbitTemplate.convertAndSend("Springboot test","Springboot 整合Rabbitmq");
    }


}
